package org.sn.jdish.spring.springboot.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * springboot helloworld
 * 
 * @author snzigod@hotmail.com
 */
@Controller
@RequestMapping("/demo")
public class DemoController {

	@ResponseBody
	@RequestMapping("/helloworld")
	String home() {
		return "Hello World!";
	}

	@RequestMapping("/")
	public String index(ModelMap map) {
		map.addAttribute("host", "http://www.cnblogs.com/snzigod");
		return "index";
	}

}